
import { setStore,clearStore } from '@/utils/group'
const state = {
    token: null,
    keepAlive:'',
    userInfo:null
}
const mutations = {
    setToken(state, o) {
        state.token = o
        setStore('token',o)
    },
    clearToken(state){
        state.token = null
        clearStore('token')
    },
    setKeep(state,o){
        state.keepAlive = o
    },
    setUserInfo(state,o){
        state.userInfo = o
        setStore('userInfo',JSON.stringify(o))
    },
    clearUserInfo(state){
        state.userInfo = null
        clearStore('userInfo')
    }
}
const actions = {

}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}